# encoding: utf-8
from app import scheduler

SWITCH_LIST = []


def getSwitctStatusJob():
    """
    定时查询切换状态
    """
    # _app = scheduler.app
    # with _app.app_context():
    #     from app.modules.switch.resources import getSwitchStatus
    #     for _switch in SWITCH_LIST[:]:
    #         _env_name = str(_switch).split('_')[0]
    #         _zone_code = str(_switch).split('_')[1]
    #         getSwitchStatus(_env_name, _zone_code)
    pass


def addSwitchList(key):
    if key in SWITCH_LIST:
        return
    SWITCH_LIST.append(key)
